package sg.edu.nus.iss.vmcs.ui;

import java.util.Observable;
import java.util.Observer;

import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * Draft no change display panel
 * @author Cuong
 *
 */
public class NoChangeAvailableDisplay {
	public static final int NO_CHANGE_DISPLAY = 0;
	private JLabel noChangeDisplayLabel;
	
	private JPanel noChangeDisplayPanel = new JPanel();
	private static NoChangeAvailableDisplay noChangeDisplay;
	
	public static NoChangeAvailableDisplay getInstance() {
		if (noChangeDisplay == null) {
			noChangeDisplay = new NoChangeAvailableDisplay();
		}
		return noChangeDisplay;
	}
	private NoChangeAvailableDisplay () {
		noChangeDisplayLabel = new JLabel("");

		noChangeDisplayPanel.add(noChangeDisplayLabel);
	}

	public JPanel getMoneyPanel() {
		return noChangeDisplayPanel;
	}

	public void setState(int state) {
		if (state == NO_CHANGE_DISPLAY) {
			noChangeDisplayLabel.setText("NO CHANGE AVAILABLE");
		} else {
			noChangeDisplayLabel.setText("");
		}
	}
	
	public JPanel getPanel() {
		return noChangeDisplayPanel;
	}
}
